using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity.ModelConfiguration.Configuration;
using ESoft.Core.DAO;
using ESoft.Core.Data.Entity;

namespace Edu.Web.Data.Entity
{
    /// <summary>
    /// Apply
    /// </summary>    
	[Table("apply")]
    public partial class ApplyEntity : BaseModel<long>
    {		    
        /// <summary>
        /// 
        /// </summary>
		[Column("title")]
        public string Title { get; set; }
    
        /// <summary>
        /// 申请人ID
        /// </summary>
		[Column("apply_user_id")]
        public long? ApplyUserId { get; set; }
    
        /// <summary>
        /// 申请类型1事假
        /// </summary>
		[Column("apply_type")]
        public int? ApplyType { get; set; }
    
        /// <summary>
        /// 开始时间
        /// </summary>
		[Column("apply_start_time")]
        public DateTime? ApplyStartTime { get; set; }
    
        /// <summary>
        /// 结束时间
        /// </summary>
		[Column("apply_end_time")]
        public DateTime? ApplyEndTime { get; set; }
    
        /// <summary>
        /// 申请时间
        /// </summary>
		[Column("apply_time")]
        public DateTime? ApplyTime { get; set; }
    
        /// <summary>
        /// 审批意见
        /// </summary>
		[Column("apply_remark")]
        public string ApplyRemark { get; set; }
    
        /// <summary>
        /// 审批人ID
        /// </summary>
		[Column("approve_user_id")]
        public long? ApproveUserId { get; set; }
    
        /// <summary>
        /// 1发起2审批中3不通过4通过
        /// </summary>
		[Column("status")]
        public int? Status { get; set; }
    
        /// <summary>
        /// 审批人意见
        /// </summary>
		[Column("approve_remark")]
        public string ApproveRemark { get; set; }
    
        /// <summary>
        /// 审批时间
        /// </summary>
		[Column("status_time")]
        public DateTime? StatusTime { get; set; }
    }

	public class ApplyEntityRegstHelper : IEntityMapper
    {
        public void RegistTo(ConfigurationRegistrar configurations)
        {
            configurations.Add<ApplyEntity>(new EntityTypeConfiguration<ApplyEntity>());
        }
    }
}

